<template>
	<div class="detail">
		<detail-header />
		<detail-swiper />
		<detail-score />
		<detail-recommend />
		<detail-comment />
		<detail-foot />
		<div class="foot" @click="top">回到顶部</div>
	</div>
</template>
<script>
	import detailHeader from './pages/Header'
	import detailSwiper from './pages/swiper'
	import detailRecommend from './pages/recommend'
	import detailScore from './pages/scored'
	import detailComment from './pages/comment'
	import detailFoot from './pages/foot'
	export default{
		components:{
			detailHeader,
			detailSwiper,
			detailScore,
			detailRecommend,
			detailComment,
			detailFoot
		},
		methods:{
			top(){
				document.documentElement.scrollTop-=100;
				let c="";
				if(document.documentElement.scrollTop>0){
					c=setTimeout(()=>{
						this.top()
					},12)
				}else{
					clearTimeout(c)
				}
			}
		}
	}
</script>
<style scoped>
.detail{
	background:#f5f5f5;
}
.foot{
	font-size:0.28rem;
	padding:0.3rem;
	background:pink;
	color:#fff;
	width:30%;
}
</style>